using BasecampRestAPI;
using BasecampUI;

namespace TestBasecampRestAPI.TestBasecampUI
{
	class FakeCredentialsMainForm : ICredentialsMainForm
	{
		public static FakeCredentialsMainForm GetInstance()
		{
			return new FakeCredentialsMainForm();
		}

		protected FakeCredentialsMainForm()
		{
		}

		#region Implementation of ICredentialsMainForm

		public ICredentialsForm CredentialsForm
		{
			get { CredentialsFormGetCalled = true; return CredentialsFormGetFakeResult; }
		}
		public bool CredentialsFormGetCalled { get; private set; }
		public ICredentialsForm CredentialsFormGetFakeResult { private get; set; }

		public IBaseCamp GetBaseCamp(IRestWebService service)
		{
			GetBaseCampCalled = true;
			GetBaseCampLastService = service;
			return GetBaseCampFakeResult;
		}
		public bool GetBaseCampCalled { get; private set; }
		public IRestWebService GetBaseCampLastService { get; private set; }
		public IBaseCamp GetBaseCampFakeResult { private get; set; }

		public bool GetBaseCampFromCredentials(out IBaseCamp camp)
		{
			GetBaseCampFromCredentialsCalled = true;
			camp = GetBaseCampFromCredentialsFakeCampResult;
			return GetBaseCampFromCredentialsFakeResult;
		}
		public bool GetBaseCampFromCredentialsCalled { get; private set; }
		public bool GetBaseCampFromCredentialsFakeResult { private get; set; }
		public IBaseCamp GetBaseCampFromCredentialsFakeCampResult { private get; set; }

		public void Close()
		{
			CloseCalled = true;
		}
		public bool CloseCalled { get; private set; }


		#endregion
	}
}